import request from "@/router/axios";
import { baseUrl } from "@/config/env";

//添加公告
export function addNotice(data) {
  return request({
    url: baseUrl + "/pc/notice",
    method: "post",
    data
  });
}

//查询公告
export function getNotice(data) {
  return request({
    url: baseUrl + "/pc/notice",
    method: "get",
    params: data
  });
}

//删除公告
export function deleteNotice(data) {
  return request({
    url: baseUrl + "/pc/notice",
    method: "delete",
    data
  });
}

//更新公告
export function updateNotice(data) {
  return request({
    url: baseUrl + "/pc/notice",
    method: "put",
    data
  });
}

//普通用户查询公告
export function getNoticeCustomer(data) {
  return request({
    url: baseUrl + "/pc/notice/customer",
    method: "get",
    params: data
  });
}

//查询我的待审批列表
export function myApproveList(data) {
  return request({
    url: baseUrl + "/pc/flow/myApproveList",
    method: "get",
    params: data
  });
}

//查询已办
export function hasApprov(data) {
  return request({
    url: baseUrl + "/pc/flow/hasApprove",
    method: "get",
    params: data
  });
}

//查询我的申请列表
export function myList(data) {
  return request({
    url: baseUrl + "/pc/flow/myList",
    method: "get",
    params: data
  });
}

//远程搜索学生
export function byName(data) {
  return request({
    url: baseUrl + "/pc/per-student/byName",
    method: "get",
    params: data
  });
}
